package com.ruoyi.useComponent;

import lombok.Data;
import org.springframework.stereotype.Component;

/**
 * @program: RuoYi
 * @description: 学生
 * @author: yanghua
 * @create: 2021-07-29 17:45
 **/
@Component(value = "student")
@Data
public class Student {
    private int age;
    private String name;
    public void eat(){
        System.out.println("边启动边吃饭");
        name="杨华";
    }
}
